import { _decorator, Component, EditBox, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('getRandomUserInfo')
export class getRandomUserInfo extends Component {
    // 账号
    @property(EditBox)
    account: EditBox = null;

    // 密码
    @property(EditBox)
    password: EditBox = null;

    protected onLoad(): void {
        this.getRandomUserInfo();
    }

    // 得到随机账号密码
    getRandomUserInfo() {
        let account = Math.random().toString(36).substr(2, 15);
        let password = Math.random().toString(36).substr(2, 15);
        this.account.string = account;
        this.password.string = password;
    }
}


